export default [{
    path: "/home",
    name: "Home",
    component: () => import("@/views/Home"),
  },
  {
    path: "/search/:keyword?",
    name: "Search",
    component: () => import("@/views/Search"),
    props(route) {
      return {
        ...route.query,
        ...route.params,
      };
    },
  },
  {
    path: "/login",
    name: "Login",
    component: () => import("@/views/Login"),
    meta: {
      FooterIsHidden: true,
    },
  },
  {
    path: "/register",
    name: "Register",
    component: () => import("@/views/Register"),
    meta: {
      FooterIsHidden: true,
    },
  },
  {
    path: "/detail/:skuId",
    name: "Detail",
    component: () => import("@/views/Detail"),
  },
  {
    path: "/addCartSuccess",
    name: "AddCartSuccess",
    component: () => import("@/views/AddCartSuccess"),
  },
  {
    path: "/shopCart",
    name: "ShopCart",
    component: () => import("@/views/ShopCart"),
  },
  {
    path: "/trade",
    name: "Trade",
    component: () => import("@/views/Trade"),
  },
  {
    path: "/pay",
    name: "Pay",
    component: () => import("@/views/Pay"),
  },
  {
    path: "/paySuccess",
    name: "PaySuccess",
    component: () => import("@/views/PaySuccess"),
  },
  {
    path: "/",
    redirect: "/home",
  },
  {
    path: "/*",
    component: () => import("@/views/404"),
  },
];